-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix to build Cantera against Sundials 4.0.0 and newer #672
Conversation
Codecov Report
@@ Coverage Diff @@
## master #672 +/- ##
==========================================
- Coverage 70.63% 70.63% -0.01%
==========================================
Files 372 372
Lines 43575 43567 -8
==========================================
- Hits 30778 30772 -6
+ Misses 12797 12795 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into the required changes to work with the newer SUNDIALS releases. I think the suggested change will simplify things a bit and localize the preprocessor checks on CT_SUNDIALS_VERSION
to the CVodesIntegrator
class.
virtual void setIterator(IterType t) { | ||
warn("setInterator"); | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we never use any method besides Newton iteration, my suggestion would be to:
- deprecate
setIterator
and remove them_iter
variable - remove the existing calls to
setIterator
, and - directly call
CVodeCreate
with theCV_NEWTON
constant if we're using an older version of Sundials.
I checked that Cantera build and pass tests with |
@band-a-prend can you remove the "cantera" from the beginning of the commit message? If you want, you can classify the commit with |
@bryanwweber |
The Sundials 3.1 and 3.2 are compatible with each other so this patch just allows to pass check for the installed Sundials 3.2
The changelog of Sundials 4.0.0 states: "With the introduction of SUNNonlinSol modules, the input parameter iter to CVodeCreate has been removed along with the function CVodeSetIterType and the constants CV_NEWTON and CV_FUNCTIONAL. Similarly, the ITMETH parameter has been removed from the Fortran interface function FCVMALLOC. Instead of specifying the nonlinear iteration type when creating the CVODE(S) memory structure, CVODE(S) uses the SUNNONLINSOL_NEWTON module implementation of a Newton iteration by default." so the appropreate conditional changes are added to control the code execution via CT_SUNDIALS_VERSION preprocessor variable to omit the parameters of Sundials solver that are no longer required.
Remove m_iter variable and deprecate setIterator function because only Newton (CV_NEWTON) iteration method is used.
This patch is backport of upstream patch [1] but with removing of 'setIterator' function instead of it's deprecation. [1] Cantera/cantera#672
This patch is backport of upstream patch [1] but with removing of 'setIterator' function instead of it's deprecation. [1] Cantera/cantera#672 Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru>
This patch is backport of upstream patch [1] but with removing of 'setIterator' function instead of it's deprecation. [1] Cantera/cantera#672 Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru>
Fix python installation path using 'libdirname' env variable. This patch is backport of upstream patch [1]. [1] Cantera/cantera#674 This patch is backport of upstream patch [1] but with removing of 'setIterator' function instead of it's deprecation. [1] Cantera/cantera#672 Closes: #12701 Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Fix python installation path using 'libdirname' env variable. This patch is backport of upstream patch [1]. [1] Cantera/cantera#674 This patch is backport of upstream patch [1] but with removing of 'setIterator' function instead of it's deprecation. [1] Cantera/cantera#672 Closes: gentoo#12701 Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Fix python installation path using 'libdirname' env variable. This patch is backport of upstream patch [1]. [1] Cantera/cantera#674 This patch is backport of upstream patch [1] but with removing of 'setIterator' function instead of it's deprecation. [1] Cantera/cantera#672 Closes: gentoo#12701 Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Fix python installation path using 'libdirname' env variable. This patch is backport of upstream patch [1]. [1] Cantera/cantera#674 This patch is backport of upstream patch [1] but with removing of 'setIterator' function instead of it's deprecation. [1] Cantera/cantera#672 Closes: gentoo#12701 Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Please fill in the issue number this pull request is fixing:
Fixes #620
Changes proposed in this pull request:
Cantera
compatibility withSundials 3.2
;Cantera
build against>=Sundials-4.0
.